using System;
using System.Collections.Generic;
using GLWrap.SceneObjects;
using ReAnimation.Helpers.WinForms;
using Tao.Platform.Windows;
using System.Drawing;

namespace GLWrap
{
    public interface IGlSceneManager
    {
        float Angle { get;  }
        float Left { get;  }
        float Right { get;  }
        float Top { get;  }
        float Bottom { get;  }
        float Near { get;  }
        float Far { get;  }
        int Width { get; }
        int Height { get; }

        Color BackColor { get; set; }

        Bitmap GrabScreenshot();

        IList<SceneObject> SceneObjects { get; }
        ICamera Camera { get; set; }
        SimpleOpenGlControl OpenGlControl { get; }

        void Initialize(SimpleOpenGlControl openGlControl);
        void Paint();
        void Refresh();
        
        IGlSceneManager AddSceneObject(SceneObject sceneObject);
        IGlSceneManager RemoveSceneObject(SceneObject obj);
        IGlSceneManager RemoveAllSceneObjects();
        bool IsAttached(SceneObject sceneObject);

        event EventHandler<EventArg<SceneObject>> SceneObjectSelected;

        event EventHandler<EventArg<Point>> SceneMouseDown;
        event EventHandler<EventArg<Point>> SceneMouseUp;
        event EventHandler<EventArg<Point>> SceneMouseMove;
        event EventHandler CameraChanged;

        SceneObject GetObjectAtPoint(Point point);
    }
}